package model;

import static org.junit.Assert.*;

import org.junit.Test;

public class AspectTest {

	@Test
	public void hasAdvice() {
		SysAspect a = new SysAspect("Aspect1");
		SysAdvice ad = new SysAdvice(false,"Advice1","void", "public");
		assertFalse(a.contains(ad));
		a.add(ad);
		assertTrue(a.contains(ad));
		SysAspect a2 = new SysAspect("Aspect1");
		SysAdvice ad2 = new SysAdvice(false,"Advice1","void", "public");
		a2.add(ad2);
		assertTrue(a.contains(ad2));
		a.add(ad2);
		assertTrue(a.contains(ad));
		assertTrue(a.getAdvice().size()==1);
		
	}
	
}
